package com.ruoyi.demo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.demo.mapper.AuctionSessionGoodsMapper;
import com.ruoyi.demo.domain.AuctionSessionGoods;
import com.ruoyi.demo.domain.vo.AuctionSessionGoodsVO;
import com.ruoyi.demo.service.IAuctionSessionGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 专场商品关联服务实现类
 * 
 * @author metaee
 * @date 2025-03-06
 */
@Service
public class AuctionSessionGoodsServiceImpl extends ServiceImpl<AuctionSessionGoodsMapper, AuctionSessionGoods> implements IAuctionSessionGoodsService
{
    @Autowired
    private AuctionSessionGoodsMapper auctionSessionGoodsMapper;

    /**
     * 查询专场商品关联列表
     * 
     * @param auctionSessionGoods 专场商品关联
     * @return 专场商品关联
     */
    @Override
    public List<AuctionSessionGoods> selectAuctionSessionGoodsList(AuctionSessionGoods auctionSessionGoods)
    {
        return auctionSessionGoodsMapper.selectAuctionSessionGoodsList(auctionSessionGoods);
    }
    
    /**
     * 查询专场商品关联详细
     * 
     * @param id 专场商品关联主键
     * @return 专场商品关联
     */
    @Override
    public AuctionSessionGoods selectAuctionSessionGoodsById(Long id)
    {
        return auctionSessionGoodsMapper.selectAuctionSessionGoodsById(id);
    }

    /**
     * 新增专场商品关联
     * 
     * @param auctionSessionGoods 专场商品关联
     * @return 结果
     */
    @Override
    public int insertAuctionSessionGoods(AuctionSessionGoods auctionSessionGoods)
    {
        return auctionSessionGoodsMapper.insertAuctionSessionGoods(auctionSessionGoods);
    }

    /**
     * 修改专场商品关联
     * 
     * @param auctionSessionGoods 专场商品关联
     * @return 结果
     */
    @Override
    public int updateAuctionSessionGoods(AuctionSessionGoods auctionSessionGoods)
    {
        return auctionSessionGoodsMapper.updateAuctionSessionGoods(auctionSessionGoods);
    }

    /**
     * 批量删除专场商品关联
     * 
     * @param ids 需要删除的专场商品关联主键
     * @return 结果
     */
    @Override
    public int deleteAuctionSessionGoodsByIds(Long[] ids)
    {
        return auctionSessionGoodsMapper.deleteAuctionSessionGoodsByIds(ids);
    }

    /**
     * 删除专场商品关联信息
     * 
     * @param id 专场商品关联主键
     * @return 结果
     */
    @Override
    public int deleteAuctionSessionGoodsById(Long id)
    {
        return auctionSessionGoodsMapper.deleteAuctionSessionGoodsById(id);
    }

    @Override
    public List<AuctionSessionGoodsVO> listSessionGoodsWithDetails(Long sessionId) {
        return baseMapper.selectSessionGoodsWithDetails(sessionId);
    }
}
